#include "tcp_server.hpp"
#include <memory>

string echo(const string &s) { return s; }

int main(int argc, char*argv[])
{
    if(argc != 2)
    {
        cout << "Usage: ./tcp_server [port]" << endl;
        exit(-1);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<EchoServer> ps(new EchoServer(echo, port));
    ps->init();
    ps->start();
    return 0;
}